home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / hardware-part1 / 5868 < prev    next >
Encoding:
Text File  |  1996-08-05  |  8.5 KB  |  217 lines

  1. Path: tcp.co.uk!usenet
  2. From: rooster@tcp.co.uk (rooster)
  3. Newsgroups: comp.sys.amiga.hardware
  4. Subject: REPOST OF Answers to our prayers?
  5. Date: 1 Mar 1996 00:58:04 GMT
  6. Organization: Total Connectivity Providers - Internet access for the UK
  7. Message-ID: <8335.6634T63T2401@tcp.co.uk>
  8. NNTP-Posting-Host: du2-30.tcp.co.uk
  9. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  10.  
  11. I got the following document from the Austex web site.
  12. We have all heard how it is due to a lack of chunky gfx output that Amiga
  13. owners cannot enjoy games of a standard comparable to PC titles.The planar
  14. format means lots of bitplanes to write to.Does the product detailed below
  15. mean an end to this?Does any know about it?Anyone seen it in action?
  16. Any programmers interested?(There are development files available.Email at
  17. end of doc)Is this the thing we have been waiting for?Let's hope it isn't
  18. stupidly expensive.Let's hope it gives good quality and is easy to use
  19. and program.Or have I got it completely wrong?
  20.  
  21.  
  22. AGX Module programming information
  23. Copyright (C) 1995 AUSTEX SOFTWARE
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25.  
  26. OVERVIEW
  27.  
  28. The AGX module is a device which plugs into the video port of any Amiga. It
  29. has a video pass-through for standard Amiga screens and accepts standard
  30. Amiga video monitor signals.
  31.  
  32. The device can convert out-going video signals from the video port into byte per
  33. pixel format or chunky pixels. Resolutions range from 160, 320 on OCS/ECS Amiga
  34. machines to 160,320 and 640 for AGA compatible machines. Combinations of these
  35. outputs may be mixed on one screen in a similar fashion to 'viewports' on the
  36. Amiga.
  37.  
  38. The Amiga screen for a 320 resolution is a 640 hires screen in four bitplanes.
  39. Each bitplane is represented at the video port by the RGBI signals. As each
  40. bit of video information from the RGBI lines is output, it is stored into one
  41. of four shift registers where the data is then latched in byte format. As the
  42. next four bytes are fetched, the current four bytes can be displayed in sequence
  43. without any loss in data integrity.
  44.  
  45.  
  46. ACTIVATING
  47.  
  48. The device is activated by setting the GENLOCK_AUDIO flag in the BPLCON0 register
  49. for each line that the chunky mode is on. ( BPLCON0 = $100, GENLOCK_AUDIO = $100
  50. (bit8) ) This bit must remain on for each video line during the chunky screen. If
  51. the bit is cleared for one video line, the AGX device will clear the mode and the
  52. set the clock speed back to default. Doing this allows more than one type of 
  53. resolution mode per screen.
  54.  
  55. Usually, for the first few lines of the screen the 'hidden' programming information
  56. such as color palette, chunky mask, and conversion speed may by programmed. Once
  57. this has been done, the 'chunky enabled' sequence is written to the screen to allow
  58. the conversion process to take place.
  59.  
  60.  
  61. BITPLANE FORMAT
  62.  
  63. The format of the screen data can be handled by the axchunky library routines supplied
  64. with the device. This allows the user to set up all the data without specific knowledge
  65. of the current screen format etc.., but for those who wish to write directly to the screen;
  66.  
  67.         Pre-Chunky data format.
  68.                 Bitplane        Function                
  69.                 3 2 1 0         -------------------------------------
  70.  
  71.                 0 0 0 x         Reserved
  72.                 0 0 1 x         Reserved
  73.                 0 1 0 0         Reserved
  74.                 0 1 0 1         Chunky mode enable
  75.                 0 1 1 0         Clock select bit 0 set
  76.                 0 1 1 1         Clock select bit 1 set
  77.                 1 0 0 d         Pixel address register
  78.                 1 0 1 d         Color palette RAM
  79.                 1 1 0 d         Pixel read mask register
  80.                 1 1 1 x         Reserved
  81.                 
  82.                 x = Don't care    d = data (one byte)
  83.  
  84.         Screen data format type 1. OCS/ECS: 160,320 or AGA 160,320,640
  85.         
  86.                 Bitplane 0      Pixel 0, 4,  8, 12, ...
  87.                 Bitplane 1      Pixel 1, 5,  9, 13, ...
  88.                 Bitplane 2      Pixel 2, 6, 10, 14, ... 
  89.                 Bitplane 3      Pixel 3, 7, 11, 15, ... 
  90.                 
  91.         Screen data format type 2. ECS/AGA: 160 only
  92.                 
  93.                 Bitplane 0      Pixel 0, 1, 2, 3, ...
  94.                 
  95.                 (this screen mode would be defined as a single bitplane
  96.                  super-hires screen with bitplanes 1-3 pointing to bitplane 0)
  97.                  
  98.  
  99. The normal sequence for the 'hidden programming' section is;
  100.  
  101. 1. Set the clock speed
  102. 2. Set the pixel read mask register (usually $ff)
  103. 3. Set the pixel address register (usually $00)
  104. 4. Write the palette information
  105. 5. Enable chunky mode
  106.  
  107.  
  108. RAMDAC
  109.  
  110. The AGX module uses a simple RAMDAC to generate the new RGB signals. The RAMDAC
  111. contains some palette RAM, a pixel mask register, control circuitry and a fast
  112. D/A converter.
  113.  
  114. The pixel mask register can be used to control a psuedo bitplane depth, e.g.
  115. setting the pixel mask register to $3f gives the effect of 6 bitplanes worth of
  116. data. Normally this register would be set to $ff for 256 colors.
  117.  
  118. The pixel address register is normally set to the starting color for the
  119. palette writes. Normally set this to $00.
  120.  
  121. The palette RAM is written in triplet sets. Each color is represented by an 18-bit
  122. RGB value. As each color is written, an index pointer is incremented to the next
  123. color etc...
  124.  
  125.  
  126. CONVERSION SPEED
  127.  
  128. Setting the speed determines the conversion resolution. There are only three valid
  129. settings;
  130.  
  131.         Clock Select bits:
  132.              C1 C0
  133.              0  0       : 320 resolution (default)
  134.              0  1       : 640 resolution
  135.              1  0       : 160 resolution
  136.              1  1       : Reserved (no clock)
  137.  
  138. The default clock is 320 resolution. Any time that the Genlock bit is cleared for one
  139. video line the clock bits are cleared back to the default. The chunky mode is also
  140. cleared so that new programming information may be performed.
  141.  
  142.  
  143. EXAMPLE SCREEN
  144.  
  145. An example setup for a 160 resolution screen could be;
  146.  
  147.  
  148. First row
  149. Bitplane 3:     $00,...
  150. Bitplane 2:     $ff,...
  151. Bitplane 1:     $ff,...
  152. Bitplane 0:     $ff,...
  153.                  ^^ 
  154.                  |
  155.                  -------------- Set C1 bit, clock set to 160 mode
  156.  
  157. Second row
  158. Bitplane 3:     $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,...
  159. Bitplane 2:     $ff,    $00,    $00,    $00,    $00,    $00,    $00,    $00,...
  160. Bitplane 1:     $00,    $00,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,...
  161. Bitplane 0:     $ff,    $00,    $00,    $00,    $00,    $10,    $10,    $10,...
  162.                  ^^      ^^     á^^      ^^     á^^     á^^     á^^     á^^
  163.                 |       |       |       |       |       |       |       |
  164.                 |       |       |       |       |       |       |       --- Color 1 Blue
  165.                 |       |       |       |       |       |       ----------- Color 1 Green
  166.                 |       |       |       |       |       ------------------- Color 1 Red
  167.                 |       |       |       |       --------------------------- Color 0 Blue
  168.                 |       |       |       ----------------------------------- Color 0 Green
  169.                 |       |       ------------------------------------------- Color 0 Red
  170.                 |       --------------------------------------------------- Starting color is 0
  171.                 ----------------------------------------------------------- Pixel mask is 255
  172.  
  173.  
  174. The next few rows contain the color triplets until all 255 colors have been defined, then
  175. finally we switch the chunky display mode on. In the example, palette color 0 is $00,$00,$00
  176. palette color1 is $10,$10,$10 etc...
  177.  
  178. Nth row
  179. Bitplane 3:     ...,    $00,...
  180. Bitplane 2:     ...,    $ff,...
  181. Bitplane 1:     ...,    $00,...
  182. Bitplane 0:     ...,    $ff,...
  183.  
  184.                          ^^
  185.                          |
  186.                          ------------------ Enable chunky mode
  187.  
  188. Nth+1 row
  189. Bitplane 3:     $00,    $04, ...
  190. Bitplane 2:     $01,    $05, ...
  191. Bitplane 1:     $02,    $06, ...
  192. Bitplane 0:     $03,    $07, ...
  193.  
  194. Would then output on the screen color 0,1,2,3,4,5,6,7 etc...  N is the number of rows required
  195. at the top of the screen to set the palette information etc.. This 160 screen is for a scrambled
  196. setup. For a true linear 160 mode, the N rows of information could be setup the same with a
  197. 320 x 4 bitplane top section and a 1280 x 1bitplane super-hires screen for rows N+1 and down.
  198.  
  199. The device will remain in chunky mode as long as the GENLOCK_AUDIO bit is set for each video
  200. line. (usually only need to set this bit in the BPLCON0 register once)
  201.  
  202.  
  203.  
  204.  
  205.  
  206. Any queries may be directed to steve@ph4227b.jcu.edu.au 
  207.  
  208. Stephen J.Smith
  209. AUSTEX SOFTWARE
  210.  
  211.  
  212.  
  213.  
  214.       Andy O'Dowd-rooster
  215.  
  216.  
  217.